package com.tasly.score.remote;

import com.tasly.user.dto.UserDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * FeignClient(name= "user-service",fallback = UserServerRemoteHystrix.class)
 * 远程调用名称及熔断器（fallback）
 */
@FeignClient(name = "user-service", fallback = UserServerRemoteHystrix.class)
public interface UserServerRemote {

    @RequestMapping(value = "/{uid}", method = RequestMethod.GET)
    UserDTO get(@PathVariable("uid") Long uid);
}
